package org.cary.lucene;

import java.io.Serializable;

import org.apache.lucene.search.Query;

public class StoreBean implements Serializable {
	
	private static final long serialVersionUID = 1L;

	public StoreBean() {
		super();
	}

	public StoreBean(String db, String indexType, String id) {
		this.db = db;
		this.indexType = indexType;
		this.id = id;
	}

	/**
	 * index类型,索引信息
	 */
	private String indexType;

	/**
	 * 检索范围
	 */
	private Integer scope;

	/**
	 * 检索对象的唯一标识位的值，用于删除，更新等等
	 */
	private String id;
	/**
	 * 创建时间
	 */
	private Long createDate;

	/**
	 * 内容标题，可能不存在
	 */
	private String title;

	/**
	 * 内容描述
	 */
	private String descrip;

	/**
	 * 实际内容
	 */
	private String content;

	// 共享类型
	private String source_type;

	// 共享资源的原始id
	private String source_id;

	/**
	 * 共享给谁
	 */
	private String persons;
	/**
	 * 信息所有者
	 */
	private String user_id;

	/**
	 * 删除查询语句用到功能的东西
	 */
	private Query query;

	/**
	 * lucnce表示记录在mysql中有对应记录，0表示没有对应记录
	 */
	private String db;

	public String getDb() {
		return db;
	}

	public void setDb(String db) {
		this.db = db;
	}

	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	public String getPersons() {
		return persons;
	}

	public String getSource_id() {
		return source_id;
	}

	public void setSource_id(String source_id) {
		this.source_id = source_id;
	}

	public void setPersons(String persons) {
		this.persons = persons;
	}

	public Query getQuery() {
		return query;
	}

	public void setQuery(Query query) {
		this.query = query;
	}

	public Integer getScope() {
		return scope;
	}

	public void setScope(Integer scope) {
		this.scope = scope;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Long getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Long createDate) {
		this.createDate = createDate;
	}

	public void setIndexType(String indexType) {
		this.indexType = indexType;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescrip() {
		return descrip == null ? "" : descrip;
	}

	public void setDescrip(String descrip) {
		this.descrip = descrip;
	}

	public String getContent() {
		return content == null ? "" : content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getIndexType() {
		return indexType;
	}

	@Override
	public String toString() {
		return "StoreBean [indexType=" + indexType + ", scope=" + scope + ", id=" + id + ", createDate=" + createDate + ", title=" + title
				+ ", descrip=" + descrip + ", content=" + content + ", source_type=" + source_type + ", source_id=" + source_id + ", persons="
				+ persons + ", user_id=" + user_id + ", query=" + query + ", db=" + db + "]";
	}

	public String getSource_type() {
		return source_type;
	}

	public void setSource_type(String source_type) {
		this.source_type = source_type;
	}

}
